/**
* 
* ====================================================================
*
* @author apov <apov@ymail.com>
*/ 
#pragma once

#include <BaseDefine.h>
#include <vector>
#include "User.h"

class User;
class AutoMakeRoom{
	enum{
		DEF_MAX_DATA_SIZE=		4096,
	};

	typedef std::vector< User* > Users;

public:
	int register_owner( User* user, char* data, int size );
	int register_member( User* user );
	int make();

	AutoMakeRoom();
	virtual ~AutoMakeRoom();

protected:

private:
	void reset();

	char data_[ DEF_MAX_DATA_SIZE ];
	int data_size_;

	User* owner_;
	Users users_;
};
